<template>
    <div class="top">
        <div class="title"><span style="color:#E2C180;"></span>{{ softName }}{{ isOnly ? '' : subTitle }}{{ `${isOnly ?
            '' :
            '管控系统'}` }}
        </div>
        <div class="extraRight">
            <!-- <div class="times" style="display: none;">
                <ZSTimes></ZSTimes>
            </div> -->
            <div class="none"></div>
            <div class="backBtn " v-if="isBack">
                <!-- <a-button type="link" size="large"> -->
                    <!-- @click="handClickBack" 去掉点击 -->
                <div class="hovers" >
                    <ZSIcon icon="icon-fanhui1" :styles="{ color: '#ffffff', fontSize: '36px' }">
                    </ZSIcon>
                </div>
                <!-- </a-button> -->
            </div>
            <!-- @click="handClick" 去掉点击 -->
            <!-- <div class="entrance AlibabaPuHuiTi"  v-else-if="isExtra">
                <span class="entrance-title">数据分析入口</span>
                <div class="logoLeftImg"></div>
            </div> -->
            <!-- 先屏蔽天气 -->
            <!-- <div class="line"></div>
                    <div class="weather">
                        <ZSWeather></ZSWeather>
                    </div> -->
        </div>
        <div class="extraLeft">
            <!-- @click="handClick" 去掉点击 -->
            <div class="logo" >
                <div class="logoLeftImg"></div>
                <span class="logoName AlibabaPuHuiTi">智隼</span>
            </div>
            <div class="times" v-if="type == 'one'">
                <ZSTimes></ZSTimes>
            </div>
        </div>
    </div>
</template>
<script>
import ZSTimes from '@/components/ZSTimes/ZSTimes';
// 天气
import ZSWeather from '@/components/ZSWeather/ZSWeather';
import ZSIcon from '@/components/ZSIcon/ZSIcon.vue';
export default {
    name: 'Head',
    components: {
        ZSTimes,
        ZSWeather,
        ZSIcon,
    },
    props: {
        softName: {
            type: String,
            default: '山东港口',
        },
        subTitle: {
            type: String,
            default: '安全生产风险'
        },
        isBack: {
            type: Boolean,
            default: false
        },
        // 是否只显示传过来得值
        isOnly: {
            type: Boolean,
            default: false,
        },
        // 显示一级大屏右侧文字
        isExtra: {
            type: Boolean,
            default: false,
        },
        type: {
            type: String,
        }

    },
    methods: {
        handClickBack() {
            this.$router.go(-1)
        },
        handClick() {
            this.$router.replace({ path: "/manage" });
        }
    },
}
</script>
<style lang="less" scoped>
.AlibabaPuHuiTi {
    font-family: AlibabaPuHuiTi;
}

.top {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-bottom: 18px;
    // 高度---标题
    height: 12vh;
    box-sizing: border-box;
    color: #fff;
    position: relative;
    background-image: url(~@/assets/images/screen/headBk.png);
    background-size: 100% 100%;
    align-items: center;

    .extraRight {
        position: absolute;
        top: 2vh;
        width: 18vw;
        height: 60px;
        overflow: hidden;
        right: 2vw;
        display: flex;
        // justify-content: space-between;
        justify-content: center;
        align-items: center;

        .entrance {
            width: 100%;
            display: flex;
            justify-content: flex-end;
            cursor: no-drop;
            padding-top: 2px;

            &-title {
                opacity: 0.65;
                font-size: 28px;
                color: #FE5D15;
                margin-right: 14px;
                margin-top: 2px;
            }
        }

        .times {
            width: 120px;
        }

        .line {
            height: 40px;
            width: 2px;
            background-color: #495F73;
        }

        .weather {
            width: 8vw;
            text-align: right;
        }

        .none {
            width: 1px;
            height: 1px;
        }

        .backBtn {
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: flex-end;
            align-items: center;
            margin-top: 2vh;
        }
    }

    .logoLeftImg {
        width: 36px;
        height: 46px;
        background-image: url(~@/assets/images/screen/topLogo.png);
        background-size: cover;
        // transform: rotateY(180deg);
        opacity: 0.65;
        line-height: 43px;
    }

    // 顶部左侧log
    .extraLeft {
        width: 20vw;
        height: 8vh;
        position: absolute;
        left: 2vw;
        top: 1.5vh;
        display: flex;
        align-items: center;

        .logo {
            width: 150px;
            height: 87px;
            display: flex;
            justify-content: start;
            align-items: center;
            cursor: pointer;
            // background-image: url(~@/assets/images/screen/topLogo.png);
            // background-size: cover;


            .logoName {
                margin-left: 14px;
                font-size: 28px;
                opacity: 0.65;
            }
        }
    }

    .title {
        font-size: 32px;
        font-weight: 1000;
        -webkit-background-clip: text;
        background-clip: text;
        color: #00e0ff;
    }

    .btns {
        position: absolute;
        right: 40px;
    }
}
</style>